package com.HomeWork12.work2;

public class Gargoyles extends Moster{
    private int attkGargoyles;

    public Gargoyles(String name, double blood, int matkMax, int matkMin, int attkGargoyles) {
        super(name, blood, matkMax, matkMin);
        this.attkGargoyles = attkGargoyles;
    }

    public Gargoyles() {

    }

    @Override
    public void attack(Player player) {
        System.out.println("龙攻击玩家");
        System.out.println(attkGargoyles);
        attkGargoyles =  (int)(Math.random()*(this.MatkMax-this.MatkMin)+this.MatkMin)+50;
        System.out.println(this.name+"本次伤害"+attkGargoyles);
        int playBlood= player.getPlayerBlood();
        playBlood=playBlood-attkGargoyles;
        System.out.println("玩家的剩余血量"+playBlood);
        double blood=getBlood();
        blood=blood+blood*0.1;
        setBlood(blood);
        player.setPlayerBlood(playBlood);
    }

}
